/******************************************************************

Description:
	Intelligent Door Lock API Functions Definition.

Version:
	V4.31.  [2003.01.20]

Author:


******************************************************************/

1ͨ˵
///////////////////////////////////////////////////////////////////
a)	    ƿģװܿϵͳйܡTMIC
	ӦRFĺȫɵһģУԼ͹Ŀ
	ά

b)  	    ƿDLLΪʽݽӿڣָ֧WINDOWS 32λƽ̨DLL
	ԼΪ׼ãstdcall
///////////////////////////////////////////////////////////////////

2DLḶ
//////////////////////////////////////////////////////////////////
	1SelectDoorLockTypeѡܿͣ
	2MakeCardOpenPort򿪷˿ڣ
	3SystemInitialization/ReadSystemPas룩
	4øƿ
	5MakeCardClosePortرշ˿ڣ[˲ʡ]
//////////////////////////////////////////////////////////////////

3API˵
//////////////////////////////////////////////////////////////////
	APIУвĶ嶼ǣ
	*Rom :Ϊ8short int
	*RomΪſŵĿռ䣬16Ʊʾ

short __stdcall MakeCardOpenPort(short Port);
ܣ
	򿪶˿ڡ

	Port:򿪵ĴڡΧ1->5

short __stdcall MakeCardClosePort(short Port);
ܣ
	رն˿ڡ

	Port:رյĴڡΧ1->5

short __stdcall SelectDoorLockType(short DoorType);
ܣ
	ѡ͡

	DoorType:0:ޣ1TM2IC3RF56,5:RF50

short __stdcall SystemInitialization(short *Password);
ܣ
	ϵͳ롣

	*PassWord:8short ռ䡣
˵
	PasswordΪͻ룬Ӧ浽ReadSystemPas

short __stdcall ReadSystemPas(short *Password);
ܣ
	ӿͻȡϵͳ롣

	*PassWord:8short ռ䡣
˵
	ͻҪ浽ԺѱΪ
	SystemInitializationĲ

short __stdcall	NewCardInit(short *Rom, short CardType);
ܣ
	¿ʼ

	CardType :1 Ϳ2 ¥㿨3 ¥4 Ӧ,5 ܿ
	  6 װ7 ʧ8 ȡʧ9 ʱ俨, 10 ֹ

short __stdcall MakeAgentCard(short *Rom);
ܣ
	̿

	*Rom:Ϊ8short int

short __stdcall MakeGuestCard(short *Rom, short Buiding, short *Room,short *StartTime,short *EndTime);
ܣ
	ƱͿ

	Buiding :¥š1-->250
	Room: š6 short 
	StartTime(5):ʼʱ䡣ʱʽyyyymmddhhmm
	EndTime(5):ֹʱ䡣ʱʽyyyymmddhhmm

short __stdcall MakeFloorCard(short *Rom, short Buiding, short *Floor,short *Time1, short *Time2, short *Time3);
ܣ
	¥㿨Ա

	Floor(10):Ч¥㡣ȡֵΧ 1-->250
	Time1(4):hh-mmhh-mmŵʱ䷶Χ
	Time2(4):hh-mmhh-mmŵʱ䷶Χ
	Time3(4):hh-mmhh-mmŵʱ䷶Χ
˵
	ÿ¥㿨Կ10¥㣬3ʱΡ

short __stdcall	MakeBuidingCard(short *Rom,short Buiding);
ܣ
	¥

	BuidingЧ¥1-->250

short __stdcall MakeEmergentCard(short *Rom);
ܣ
	Ӧ

short __stdcall MakeChiefCard(short *Rom);
ܣ
	ܿ

short __stdcall MakeStopCard(short *Rom);
ܣ
	ֹ

short __stdcall MakeLostCard(short *Rom,short *LostRom);
ܣ
	ƹʧ

	LostRomĽṹRomһ

short __stdcall MakeUnLostCard(short *Rom,short *UnLostRom);
ܣ
	ȡʧ

	UnLostRomĽṹRomһ

short __stdcall MakeTimeCard(short *Rom,short *Time);
ܣ
	ʱ俨

	Time(6):yyyy-mm-dd-hh-mm-ss

short __stdcall MakeInstallCard(short *Rom,short Buiding, short Floor, short *Room, short *maskcode);
ܣ
	ưװ

	Buiding:¥š1--250
	Floor:¥㡣1--250
	Room:š6short int
	maskcode:롣6short intӦλЧʱΪ1Ϊ0
short __stdcall MakeDataCard(short *Rom);
ܣ
	ݿ
˵
	ֻиӦRFҪõ˺

short __stdcall ReadDataCard(short *Rom);
ܣ
	ȡݿ
˵
	˺ݿݶڴ档ΪݿȽϴҪȴʱϳ
	μReadOneOpenDoorRecord

short __stdcall	ReadOneOpenDoorRecord(short *Buiding, short *Room, short *Kind, short *OpenTime, short *Rom);
ܣ
	ȡһż¼

	*Buiding:¥
	*Room:
	*Kind:ͣ0 еף1 Ϳ2 ¥㿨3 ܿ4 Ӧţ5 ¥6 Ӧ
	*OpenTime:yyyy-mm-dd-hh-mm
	*Rom:ſš
˵
     	ô˺ǰӦȵ ReadDataCard
     	ѭô˺ֱݶȡϣ-7

short __stdcall ReadRom(short *Rom);
ܣ
     ȡš
//////////////////////////////////////////////////////////////////////////

4ֵ壺
/////////////////////////////////////////////////////////////////////////
	1: ȷ;
        -1: ûм⵽;
        -2: ûм⵽;
        -3: ЧĿ;
        -4: Ͳ;
        -5: д;
        -6: δ;
        -7: ȡ;
        -8: ЧĲ;
        -9: ЧĲ;
        -10: ;
	-11: ˿ʹ;
	-12: ͨų
/////////////////////////////////////////////////////////////////////////